//
// Created by Administrator on 2021/12/5.
//

#include "Volume.h"

RawData *Volume::generate() {
    auto data = new RawData();
    int n = data->get_n();

    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            for (int k = 0; k < n; k++) {
                data->get_field()[(k * n + j) * n + i] = Noise::get_value(i * 0.0201f, j * 0.0201f, k * 0.0201f);
            }
        }
    }

    return data;
}
